package com.study.scala.collections.set

object TestSet {

  def main(args: Array[String]): Unit = {

    var jetSet = Set("zhaosc", "chao");
    jetSet += "shi";
    println(jetSet.contains("chao"));

    val set1 = Set("zhaosc", "zhao", "shi", "chao");
    val set2 = Set("zhaosd", "zhao", "shi", "dong");

    println(set1.intersect(set2))
    println(set1 & set2)

    println(set1.diff(set2))
    println(set1 &~ set2)
  }

}